import request from '@/utils/system/request'

export function getClusterOverviewApi() {
  return request({
    url: '/cluster/getClusterOverview',
    method: 'get',
  })
}

export function getClusterInfoApi() {
  return request({
    url: '/cluster/getClusterInfo',
    method: 'get',
  })
}

export function getAllNamespaceApi() {
  return request({
    url: '/cluster/getAllNamespace',
    method: 'get',
  })
}
export function getPodsApi(data:object) {
  return request({
    url: '/cluster/getPods',
    method: 'post',
    data
  })
}

export function getPodDetailApi(data:object) {
  return request({
    url: '/cluster/getPodDetail',
    method: 'post',
    data
  })
}

export function createNamespaceApi(data:object) {
  return request({
    url: '/cluster/createNamespace',
    method: 'post',
    data
  })
}
export function getPythonImagesApi(data:object) {
  return request({
    url: '/cluster/getPythonImages',
    method: 'post',
    data
  })
}
export function goTaskContainerApi(data:object) {
  return request({
    url: '/cluster/goTaskContainer',
    method: 'post',
    data
  })
}
export function getPodsLoadApi() {
  return request({
    url: '/cluster/getPodsLoad',
    method: 'get',
  })
}

export function deletePodApi(data:object) {
  return request({
    url: '/cluster/deletePod',
    method: 'post',
    data,
  })
}

export function duplicate_student_files_api(data:object) {
  return request({
    url: '/cluster/duplicate_student_files',
    method: 'post',
    data,
  })
}


export function getBackupDirAPI(data:object) {
  return request({
    url: '/cluster/getBackupDir',
    method: 'post',
    data,
  })
}


export function RecoverBackupFileApi(data:object) {
  return request({
    url: '/cluster/RecoverBackupFile',
    method: 'post',
    data,
  })
}

export function getBackupSettingAPI() {
  return request({
    url: '/cluster/getBackupSetting',
    method: 'get',
  })
}

export function addDefaultParamApi(data:object) {
  return request({
    url: '/cluster/addDefaultParam',
    method: 'post',
    data,
  })  
}

export function saveDefaultParamsApi(data:object) {
  return request({
    url: '/cluster/saveDefaultParams',
    method: 'post',
    data,
  })  
}

export function getDefaultParamsApi() {
  return request({
    url: '/cluster/getDefaultParams',
    method: 'get',
  })  
}
export function handleDeleteStaticParamApi(data:object) {
  return request({
    url: '/cluster/handleDeleteStaticParam',
    method: 'post',
    data
  })  
}
export function ctrlSaveFilesApi(data:object) {
  return request({
    url: '/cluster/ctrlSaveFiles',
    method: 'post',
    data
  })  
}
export function getExamStartTimeApi(data:object) {
  return request({
    url: '/cluster/getExamStartTime',
    method: 'post',
    data
  })  
}